package cn.iocoder.yudao.module.ao.dal.mysql.classdiscipline;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.ao.dal.dataobject.classdiscipline.ClassDisciplineDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.ao.controller.admin.classdiscipline.vo.*;

/**
 * 高技课堂纪律情况登记 Mapper
 *
 * @author 小y
 */
@Mapper
public interface ClassDisciplineMapper extends BaseMapperX<ClassDisciplineDO> {

    default PageResult<ClassDisciplineDO> selectPage(ClassDisciplinePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ClassDisciplineDO>()
                .betweenIfPresent(ClassDisciplineDO::getFillTime, reqVO.getFillTime())
                .likeIfPresent(ClassDisciplineDO::getClassName, reqVO.getClassName())
                .eqIfPresent(ClassDisciplineDO::getClassSession, reqVO.getClassSession())
                .eqIfPresent(ClassDisciplineDO::getEveningSession, reqVO.getEveningSession())
                .eqIfPresent(ClassDisciplineDO::getUnbaggedPhones, reqVO.getUnbaggedPhones())
                .eqIfPresent(ClassDisciplineDO::getAbsentCount, reqVO.getAbsentCount())
                .eqIfPresent(ClassDisciplineDO::getSpecialAbsentCount, reqVO.getSpecialAbsentCount())
                .eqIfPresent(ClassDisciplineDO::getIsSalute, reqVO.getIsSalute())
                .eqIfPresent(ClassDisciplineDO::getIsRollCall, reqVO.getIsRollCall())
                .eqIfPresent(ClassDisciplineDO::getIsAssignShowHomework, reqVO.getIsAssignShowHomework())
                .eqIfPresent(ClassDisciplineDO::getEveningHomeworkContent, reqVO.getEveningHomeworkContent())
                .eqIfPresent(ClassDisciplineDO::getRemark, reqVO.getRemark())
                .eqIfPresent(ClassDisciplineDO::getImageUrl, reqVO.getImageUrl())
                .eqIfPresent(ClassDisciplineDO::getProcessStatus, reqVO.getProcessStatus())
                .eqIfPresent(ClassDisciplineDO::getFiller, reqVO.getFiller())
                .eqIfPresent(ClassDisciplineDO::getUpdateBy, reqVO.getUpdateBy())
                .orderByDesc(ClassDisciplineDO::getRecordId));
    }

}